<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>11.v-model和数据的双向绑定</title>


</head>
<body>
<div id="app">
    <input type="text" v-model="message">
    <div>{{message}}</div>
    <input type="button" value="改变输入框的值"@click="changeMsg('凌哲熙')">
</div>


<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    const app = new Vue({
        el: '#app',
        data: {
            message:""
        },
        methods: {
            changeMsg(msg) {
                this.message = msg;
            }
        },
        components: {}
    });
</script>
</body>
</html>